/*
 * Copyright 2020-2021 redragon.dongbin
 *
 * This file is part of redragon-erp/赤龙ERP.

 * redragon-erp/赤龙ERP is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.

 * redragon-erp/赤龙ERP is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with redragon-erp/赤龙ERP.  If not, see <https://www.gnu.org/licenses/>.
 */
package com.erp.masterdata.calendar.dao.model;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

@Entity
@Table(name="md_finance_calendar_period", schema="erp")
@DynamicInsert(true)
@DynamicUpdate(true)
public class MdFinanceCalendarPeriod implements java.io.Serializable {

    //serialVersionUID
    private static final long serialVersionUID = 1L;

    //Constructors
    public MdFinanceCalendarPeriod() {
    }
    
    //Fields
    
    //主键
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name = "period_id", unique = true, nullable = false)
    private Integer periodId;
    
    public Integer getPeriodId() {
        return this.periodId;
    }
    public void setPeriodId(Integer periodId) {
        this.periodId = periodId;
    }
    
    //日历编码
    @Column(name = "calendar_code", unique = false, nullable = false, length = 45)
    private String calendarCode;
    
    public String getCalendarCode() {
        return this.calendarCode;
    }
    public void setCalendarCode(String calendarCode) {
        this.calendarCode = calendarCode;
    }
    
    //期间编码
    @Column(name = "period_code", unique = true, nullable = false, length = 45)
    private String periodCode;
    
    public String getPeriodCode() {
        return this.periodCode;
    }
    public void setPeriodCode(String periodCode) {
        this.periodCode = periodCode;
    }
    
    //期间名称
    @NotBlank(message="期间名称不能为空")
    @Column(name = "period_name", unique = true, nullable = false, length = 45)
    private String periodName;
    
    public String getPeriodName() {
        return this.periodName;
    }
    public void setPeriodName(String periodName) {
        this.periodName = periodName;
    }
    
    //期间年度
    @NotBlank(message="期间年度不能为空")
    @Column(name = "period_year", unique = false, nullable = false, length = 45)
    private String periodYear;
    
    public String getPeriodYear() {
        return this.periodYear;
    }
    public void setPeriodYear(String periodYear) {
        this.periodYear = periodYear;
    }
    
    //期间季度
    @NotBlank(message="期间季度不能为空")
    @Column(name = "period_quarter", unique = false, nullable = false, length = 45)
    private String periodQuarter;
    
    public String getPeriodQuarter() {
        return this.periodQuarter;
    }
    public void setPeriodQuarter(String periodQuarter) {
        this.periodQuarter = periodQuarter;
    }
    
    //期间开始日期
    @NotNull(message="期间开始日期不能为空")
    @Column(name = "period_start_date", unique = false, nullable = false)
    private Date periodStartDate;
    
    public Date getPeriodStartDate() {
        return this.periodStartDate;
    }
    public void setPeriodStartDate(Date periodStartDate) {
        this.periodStartDate = periodStartDate;
    }
    
    //期间结束日期
    @NotNull(message="期间结束日期不能为空")
    @Column(name = "period_end_date", unique = false, nullable = false)
    private Date periodEndDate;
    
    public Date getPeriodEndDate() {
        return this.periodEndDate;
    }
    public void setPeriodEndDate(Date periodEndDate) {
        this.periodEndDate = periodEndDate;
    }
    
    //期间状态（打开OPEN，关闭CLOSE）
    @NotBlank(message="期间状态不能为空")
    @Column(name = "period_status", unique = false, nullable = false, length = 45)
    private String periodStatus;
    
    public String getPeriodStatus() {
        return this.periodStatus;
    }
    public void setPeriodStatus(String periodStatus) {
        this.periodStatus = periodStatus;
    }
    
    //调整标识（调整期间一般为一年年底多一个月）
    @Column(name = "adjust_flag", unique = false, nullable = false, length = 1)
    private String adjustFlag;
    
    public String getAdjustFlag() {
        return this.adjustFlag;
    }
    public void setAdjustFlag(String adjustFlag) {
        this.adjustFlag = adjustFlag;
    }
    
    //版本
    @Column(name = "version", unique = false, nullable = false)
    private Integer version;
    
    public Integer getVersion() {
        return this.version;
    }
    public void setVersion(Integer version) {
        this.version = version;
    }
    
    //状态
    @Column(name = "status", unique = false, nullable = false, length = 1)
    private String status;
    
    public String getStatus() {
        return this.status;
    }
    public void setStatus(String status) {
        this.status = status;
    }
    
    //创建时间
    @Column(name = "created_date", unique = false, nullable = false)
    private Date createdDate;
    
    public Date getCreatedDate() {
        return this.createdDate;
    }
    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }
    
    //创建人
    @Column(name = "created_by", unique = false, nullable = false, length = 45)
    private String createdBy;
    
    public String getCreatedBy() {
        return this.createdBy;
    }
    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }
    
    //最后修改时间
    @Column(name = "last_updated_date", unique = false, nullable = true)
    private Date lastUpdatedDate;
    
    public Date getLastUpdatedDate() {
        return this.lastUpdatedDate;
    }
    public void setLastUpdatedDate(Date lastUpdatedDate) {
        this.lastUpdatedDate = lastUpdatedDate;
    }
    
    //最后修改人
    @Column(name = "last_updated_by", unique = false, nullable = true, length = 45)
    private String lastUpdatedBy;
    
    public String getLastUpdatedBy() {
        return this.lastUpdatedBy;
    }
    public void setLastUpdatedBy(String lastUpdatedBy) {
        this.lastUpdatedBy = lastUpdatedBy;
    }
    
    //组织机构
    @Column(name = "org_code", unique = false, nullable = false, length = 10)
    private String orgCode;
    
    public String getOrgCode() {
        return this.orgCode;
    }
    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }
    
    
}